# -*- coding: utf-8 -*-
# Author: xiantingDeng
# File: 01_作用域.py
# Time: 19:37

"""
def test():
    a = 100
    b = 200
    print(locals())

test()

# 查看全局变量 globals()
# 查看局部变量 locals()

"""

num = 100
def dtest():
    num = 200
    def dtest2():
        num = 300
        print(num)
    return dtest2


if __name__ == '__main__':
    result = dtest()
    result()
    print(dir(dtest))